package com.code.day07.Streamsdy;

import java.util.ArrayList;
import java.util.stream.Stream;

public class DemoStream {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("apple");
        list.add("b");
        list.add("c");
        list.add("d");
        list.add("e");
        list.add("f");
        System.out.println(list);
        Stream<String> stream = list.stream();
        stream.filter(s -> s.startsWith("b")).filter(s -> s.length() == 5).forEach(System.out::println);
    }
}
